package com.gitee.chili.leisure.domain;

import com.gitee.chili.leisure.base.GenerateId;
import com.gitee.chili.leisure.enums.Level;
import com.gitee.chili.leisure.enums.Status;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * Grade
 *
 * @author week solider
 * @since 2020.09.02
 */
@Data
@Entity
@Table(name = "leisure_grade")
@EqualsAndHashCode(callSuper = true)
public class Grade extends GenerateId<Long> {

    private Level level;

    /**
     * 番数限制
     */
    @Column(name = "capped_points")
    private Integer cappedPoints;

    /**
     * 基础底分
     */
    @Column(name = "base_score")
    private Integer baseScore;

    /**
     * 进场最低游戏币数量
     */
    @Column(name = "lower_score")
    private BigDecimal lowerScore;

    /**
     * 进场最高游戏币数量
     */
    @Column(name = "upper_score")
    private BigDecimal upperScore;

    private Status status;

    /**
     * 配置信息
     */
    @OneToOne
    @JoinColumn(name = "setting_id")
    private Setting setting;

    /**
     * 游戏类型ID
     */
    @Column(name = "games_mode_id")
    private Long gameType;
}
